package com.zgscwjm.taobaphelper;

import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;

/**
 * Created by zgscwjm on 17-3-1.
 * 对应原来的bf
 */
public class click_stopservice implements View.OnClickListener {

    final MainActivity mainActivity;

    public click_stopservice(MainActivity mainActivity) {
        this.mainActivity = mainActivity;
    }

    @Override
    public void onClick(View v) {
        this.mainActivity.h();
        this.mainActivity.stopService(new Intent(this.mainActivity,NetflowMissionService.class));
        this.mainActivity.stopService(new Intent(this.mainActivity,CheckMissionRunService.class));
        if (this.mainActivity.checkInputMethod()){
            ((InputMethodManager)this.mainActivity.getSystemService(Context.INPUT_METHOD_SERVICE)).showInputMethodPicker();
        }
    }
}
